new Vue({
    el: "#wap_add_pro",
    data() {
        return {
            services: services,
            addProName:'',
            addProDuty:'',
            addProContext:'',
            ResumeId:''
        }
    },
    methods:{
        addPro:function () {
            if (this.addProName == '' || this.addProName == null) {
                layerMsg('项目名称不为空');
                return
            }
            var that = this;
            $.ajax({
                url: that.services + "/user/resume/experienceProject"
                , type: "put"
                , contentType: "application/json;charset=utf-8"
                , xhrFields: {
                    withCredentials: true
                }
                , crossDomain: true
                , data: JSON.stringify({
                    "resumeId": that.ResumeId,
                    "projectName": that.addProName,
                    "duties": that.addProDuty,
                    "workContext": that.addProContext
                })
                , success: function (res) {
                    var check = ApiLoginStatus(res);
                    if(check==false)
                        return false;
                    if(res.success){
                        layerMsg(res.message);
                        setTimeout(function () {
                            window.location.href="my-resume.html" ;
                        }, 500);
                    }
                }
            })
        }
    },
    created () {
        this.ResumeId = $.cookie('resumeId');
    }
});